#System
'****************************************************************************
'*   RSI for ETFs  (RSIforETFs.txt)
'*     by Jeremy Williams
'*	   April 14, 2007
'*
'*	Adapted from Technical Analysis of Stocks and Commodities
'*     June 2008
'*
'*  Summary: 
'*
'*  This system generates signals based on the RSI methodology Gerald
'*  Gardner described in "Profit With ETF's" from the June 2008 edition
'*  of Technical Analysis of Stocks and Commodities. For more 
'*  information see Trader's Tips in the June 2008 issue of Technical 
'*  Analysis of Stocks and Commodities.
'*
'*  Parameters:
'*
'*  Periods -  Specifies the number of periods used for the RSI calculation 
'*
'****************************************************************************** 

#Param "Periods",2

Dim myRSI	As Single

' Calculate the RSI
myRSI = stdRSI(Periods)

' If entry conditions are met fire a long signal
If (myRSI <2) And (myRSI[1] > 1) Then
	Signal = LongSignal	
End if

' Plot the System
SetScales(0,100)
PlotLabel(2)
Plot("myRSI",myRSI)